#ifndef GLOBAL_H
#define GLOBAL_H

//control constants
#define MOD_NUM     500000  //used for the main control loop
#define STEP_MOD    1000   //used for how often a process makes a request
#define SLEEP_MOD   8       //used for the amount of time an io device sleeps
#define NUM_IO      3
#define IO_QUEUE_SIZE   3;
#define WAIT_TIME    1

#define NO_ID       -1

//PROCESS STATES
#define RUNNING     0
#define READY       1
#define INTERRUPTED 2
#define BLOCKED     3

//PROCESS TYPE
#define COMPUTE     0
#define IOBOUND     1
#define KEYBOARD    2
#define PRODUCER    3
#define CONSUMER    4

//request/interrupt type
#define NOTHING     0
#define IO_REQUEST  1
#define IO_INT      2
#define TIMER_INT   3
#define LOCK_MTX    4
#define UNLOCK_MTX  5
#define WAIT        6
#define SIGNAL      7
#define KEYBOARD_REQUEST 8
#define READ        9
#define WRITE       10
#define CHECK_FULL  11
#define CHECK_EMPTY 12

//ERRORS
#define NO_ERROR    0

#define TRUE        1
#define FALSE       0


typedef int bool;

#endif
